package tech.aistar.service;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import tech.aistar.entity.Manchoice;
import tech.aistar.service.impl.ManchoiceServiceImpl;


import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring/spring-*.xml"})
public class testManchoiceService {

    @Autowired
    private ManchoiceServiceImpl manchoiceService;

    @Test
    public void testfindAll(){
        List<Manchoice> manchoiceList = manchoiceService.findAll();
        System.out.println(manchoiceList);
    }

    @Test
    public void testfindById(){
        Manchoice manchoiceList = manchoiceService.findById(1L);
        System.out.println(manchoiceList);
    }

    @Test
    public void testfindByPaperId(){
        List<Manchoice> manchoiceList = manchoiceService.findByPaperId(1L);
        System.out.println(manchoiceList);
    }

    @Test
    public void testfindAnswerByPaperId(){
        String answerByid = manchoiceService.findAnswerByid(1L);
        System.out.println(answerByid);
    }
}
